<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./lib/jquery.js"></script>
</head>

<body>
    <h3>JSONP</h3>
    JSON with Padding
    <br>JSONP 的实现原理就是通过 script标签的src属性请求跨域的数据接口,并通过函数调用的形式接受跨域接口响应回来的数据
    <br>JSONP实际上就是script的脚本请求 ,跟Ajax无关;且只能发起GET请求
    <script>
        $.ajax({

                method: 'get',
                url: 'http://www.liulongbin.top:3006/api/jsonp',
                data: {
                    name: 'zs',
                    age: 18
                },
                success: function(res) {
                    console.log(res);
                }


            }


        )
    </script>
</body>

</html>